Eliminate duplicate args in query